package br.com.social.mobile.util;

import java.security.MessageDigest;

import sun.misc.BASE64Encoder;

public class Crypto {

	public static String encrypt(String value) {
		try {
			MessageDigest digest = MessageDigest.getInstance("MD5"); 
			digest.update(value.getBytes()); 
			BASE64Encoder encoder = new BASE64Encoder (); 
            return (new String(encoder.encode (digest.digest ())));
    			
        } catch (Exception e) {
           e.printStackTrace();
        }
		return null;
		
	
		
	}
	
	public static void main(String[] args) {
		System.out.println(encrypt("michelle02"));
	}
	
}
